package com.lcw.lostandfound.mapper;

import com.github.pagehelper.PageInfo;
import com.lcw.lostandfound.pojo.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface GoodsMapper {
    int delete(Integer id);

    int insert(Goods goods);

    int update(Goods goods);

    int updateViews(Integer id);

    List<Goods> findAllGoods();

    //搜索功能
    List<Goods> findByLike(String search);

    Goods findById(Integer id);
    //查找用户发布的失物招领启事
    List<Goods> findByUserId(Integer userId);

    //分页
    List<Goods> listFindMsg(Integer type);
}